package com.teapos.enumtype;

public enum PadOrderStatusEnum {
	
	NOT(0, "未结算"),
	WAIT(1, "待结算"),
	YES(2, "已结算");
	
	private int code;
	private String desc;
	private PadOrderStatusEnum(int code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	
	public static PadOrderStatusEnum getEnumByCode(int code) {
		PadOrderStatusEnum[] enums = PadOrderStatusEnum.values();
		for(PadOrderStatusEnum enumtype:enums) {
			if(enumtype.getCode()==code) return enumtype;
		}
		return null;
	}

}
